Skip to content

Fix running protoc#21

Closed
kolyshkin wants to merge 1 commit into
containerd:masterfrom
kolyshkin:fix
Closed

Fix running protoc#21
kolyshkin wants to merge 1 commit into
containerd:masterfrom
kolyshkin:fix

Conversation

@kolyshkin

@kolyshkin kolyshkin commented Oct 2, 2018

Copy link
Copy Markdown
Contributor

A recent commit (PR #20) caused a regression:

protoc --decode google.protobuf.FileDescriptorSet /usr/local/include/google/protobuf/descriptor.proto
/usr/local/include/google/protobuf/descriptor.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).

Although I can't seem to reproduce it locally, it is clear that
protoc do require --proto_path in this case. Add it back.

Fixes: 95af7b7

A recent commit caused a regression:

> protoc --decode google.protobuf.FileDescriptorSet /usr/local/include/google/protobuf/descriptor.proto
> /usr/local/include/google/protobuf/descriptor.proto: File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).

Although I can't seem to reproduce it locally, it is clear that
protoc do require --proto_path in this case. Add it back.

Fixes: 95af7b7

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin

Copy link
Copy Markdown
Contributor Author

@stevvooe PTAL

@kolyshkin

Copy link
Copy Markdown
Contributor Author

Maybe it's not needed for protoc 3.6.1, but it def fails with 3.5.0

@kolyshkin

Copy link
Copy Markdown
Contributor Author

@kolyshkin

Copy link
Copy Markdown
Contributor Author

Maybe it's not needed for protoc 3.6.1, but it def fails with 3.5.0

Indeed it works fine with 3.6.1:
https://circleci.com/gh/docker/swarmkit/9641?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
(see the "Compile/lint/vet/protobuf validation" step)

@kolyshkin

kolyshkin commented Oct 4, 2018

Copy link
Copy Markdown
Contributor Author

This looks ugly, and is not needed for protoc 3.6.1, so feel free to close

@stevvooe

stevvooe commented Nov 2, 2018

Copy link
Copy Markdown
Member

@kolyshkin Let me know if that changes!

@stevvooe stevvooe closed this Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants